package com.cgw.web.rent.action;

import java.util.List;

import com.cgw.common.base.BaseAction;
import com.cgw.dmplt.common.PageBean;
import com.cgw.dmplt.rent.dao.PayFlowDao;
import com.cgw.dmplt.rent.domain.PayFlow;

public class PayFlowAction extends BaseAction {

	private PayFlow payFlow;
	private PageBean page;
	
	public PageBean getPage() {
		return page;
	}

	public void setPage(PageBean page) {
		this.page = page;
	}

	public String doList(){
		try {
			if (payFlow == null)
				payFlow = new PayFlow();
			PayFlowDao payDao = (PayFlowDao) getBean("payFlowDao");
			List<PayFlow> payFlowList = payDao.listPayFlow(payFlow);
//			getHttpServletRequest().setAttribute("payFlowList", payFlowList);
			Integer count = payDao.listPayFlowCount(payFlow);
			page = new PageBean(payFlowList, count, 1);
		} catch (Exception e) {
			log.error("查询交租流水列表出错！");
		}
		return SUCCESS;
	}

	public PayFlow getPayFlow() {
		return payFlow;
	}

	public void setPayFlow(PayFlow payFlow) {
		this.payFlow = payFlow;
	}

}
